home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-06-25 | 1.2 KB | 65 lines | [TEXT/KAHL] |
- #include <Events.h>
-
-
- void InitToolbox(void);
-
- void InitToolbox()
- {
- InitGraf((Ptr) &qd.thePort);
- InitFonts();
- InitWindows();
- InitMenus();
- FlushEvents(everyEvent,0);
- TEInit();
- InitDialogs(0L);
- InitCursor();
- }
- #if 0
- main()
- {
- InitToolbox();
-
- Rect bounds = { 40, 8, 40 + 480, 8 + 640 };
- WindowPtr macsbugWindowP = NewWindow ( nil, & bounds, "\pMacsbug", true, 0, (WindowPtr) nil, true, 0 );
-
- BitMap macsbugDisplayBitMap;
-
- Rect r = { 0, 0, 480, 640 };
- macsbugDisplayBitMap.baseAddr = (Ptr) 0x17cac62;
- macsbugDisplayBitMap.rowBytes = 640 / 8;
- macsbugDisplayBitMap.bounds = r;
-
- Boolean gQuit = false;
-
- while ( gQuit == false )
- { EventRecord event;
-
- if ( WaitNextEvent ( everyEvent, & event, 60, nil ) )
- {
- switch ( event.what )
- {
- case mouseDown:
-
-
- case updateEvt:
- { WindowPtr window = (WindowPtr) event.message;
-
- if ( window == macsbugWindowP )
- {
- CopyBits ( & macsbugDisplayBitMap, & window->portBits,
- & macsbugDisplayBitMap.bounds, & macsbugDisplayBitMap.bounds,
- srcCopy, nil );
- }
- }
- break;
-
- case keyDown:
- gQuit = true;
- break;
- }
- }
- }
-
- return 0;
- }
- #endif